package com.example.demo.service;

import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * Created by lyc on 2019/6/7.
 */
public interface FileService {

    /**
     * 单个
     * @param file
     * @param request
     * @return
     * @throws IOException
     */
    String upload(MultipartFile file, HttpServletRequest request) throws IOException;

    /**
     * 多个
     * @param files
     * @return
     * @throws IOException
     */
    String uploads(MultipartFile[] files) throws IOException;

    /**
     * base64
     * @param image
     * @return
     * @throws IOException
     */
    String uploadBase64(String image) throws IOException;
}
